package com.liu.common.entity;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Getter;
import lombok.Setter;


/**
 *  结果返回实体类
 *  @JsonInclude(JsonInclude.Include.NON_NULL)
 *  对象中的属性如果为空，则该字段不进行转换
 *
 *
 */
@Getter
@Setter
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Result {


   private boolean flag;//是否成功
   private Integer code;// 返回码
   private String message;//返回信息
   private Object data;// 返回数据

   public Result() {
   }

   public Result(boolean flag, Integer code, String message, Object data) {
      this.flag = flag;
      this.code = code;
      this.message = message;
      this.data = data;
   }


   public Result(boolean flag, Integer code, String message) {
      this.flag = flag;
      this.code = code;
      this.message = message;
   }
}
